/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.login.plugin.e;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.FrameLayout.LayoutParams;
import android.widget.ScrollView;
import com.qihoo.gamecenter.sdk.common.b;
import com.qihoo.gamecenter.sdk.common.c;
import com.qihoo.gamecenter.sdk.common.g.a;
import com.qihoo.gamecenter.sdk.login.plugin.a;
import com.qihoo.gamecenter.sdk.login.plugin.h.f;
import com.qihoo.gamecenter.sdk.login.plugin.register.rapid.RegisterMainLayout;

public class e implements g.a {
    private Activity a;
    private Intent b;
    private RegisterMainLayout c;

    public void run(b paramb, Intent paramIntent) {
        this.a = ((Activity) paramb);
        this.b = paramIntent;
        boolean bool = this.b.getExtras().getBoolean("screen_orientation", true);
        f.a(bool, this.a);
        try {
            ((c) this.a).setActivityControl(new a((b) this.a));
        } catch (Exception localException) {
            com.qihoo.gamecenter.sdk.login.plugin.h.e.b("Register", "set control in run error!", localException);
        }
    }

    private void a() {
        this.c = new RegisterMainLayout(this.a, this.b);
    }

    private void b() {
        ScrollView localScrollView = new ScrollView(this.a);
        FrameLayout.LayoutParams localLayoutParams1 = new FrameLayout.LayoutParams(-2, -2);
        localScrollView.setLayoutParams(localLayoutParams1);
        localScrollView.addView(this.c);
        FrameLayout.LayoutParams localLayoutParams2 = new FrameLayout.LayoutParams(f.a(this.a, 320.0F), -2);
        localLayoutParams2.gravity = 17;
        this.a.setContentView(localScrollView, localLayoutParams2);
    }

    private class a extends a {
        public a(b paramb) {
            super(paramb);
        }

        public void onCreateControl(Bundle paramBundle) {
            super.onCreateControl(paramBundle);
            e.a(e.this);
            e.b(e.this);
        }

        public void onBackPressedControl() {
            if (e.c(e.this).a())
                return;
            super.onBackPressedControl();
        }

        public void onPauseControl() {
            super.onPauseControl();
        }

        public void onDestroyControl() {
            super.onDestroyControl();
        }
    }
}